"""
Copyright (c) 2022 Guangdong University of Technology
PhotLab is licensed under [Open Source License].
You can use this software according to the terms and conditions of the [Open Source License].
You may obtain a copy of [Open Source License] at: [https://open.source.license/]

THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.

See the [Open Source License] for more details.

Author: Meng Xiang, Junjiang Xiang
Created: 2023/8/19
Supported by: National Key Research and Development Program of China
"""

def hybrid(input_signal, input_signal_lo):
    """90度混频器
            Args:
                input_signal: 输入信号
                input_signal_lo： 本地振荡器生成的光信号

            Returns:
                output：四个具有90度相位差的光信号

            """

    output_0 = input_signal+input_signal_lo
    output_180 = input_signal-input_signal_lo
    output_90 = input_signal + input_signal_lo*1j
    output_270 = input_signal - input_signal_lo*1j
    return output_0, output_180, output_90, output_270